package com.pj.wisdomlogistics.mvp.presenter;


import com.pj.wisdomlogistics.mvp.contract.RetPwdContract;
import com.pj.wisdomlogistics.mvp.frame.ActivityPresenter;
import com.pj.wisdomlogistics.mvp.model.RetPwdModel;
import com.pj.wisdomlogistics.rx.FilterSubscriber;


public class RetPwdPresenter extends ActivityPresenter<RetPwdModel, RetPwdContract.View> implements RetPwdContract.Presenter {
    public static final String TAG = "RetPwdPresenter";


    @Override
    public void mofifyPassword(String userID, String newPassword, String oldPassword) {
        addSubscription(getModel().mofifyPassword(userID, newPassword, oldPassword), new FilterSubscriber() {
            @Override
            public void onError(int errorCode, String errorMsg) {
                getView().onError(errorMsg);
            }

            @Override
            public void onNext(Object mO) {
                getView().onSuccess();
            }
        });
    }
}
